package hong.jun.time;

import hong.jun.task.ThreadTask;

/**
 * 说明:
 * Created on 2023/10/23 16:57
 *
 * @author yanghongjun <1737619387@qq.com>
 */
public class TimeTask extends ThreadTask {
    private final long cur;

    public TimeTask(long cur) {
        this.cur = cur;
    }

    @Override
    protected void action() throws InterruptedException {
        //当前任务执行时候，对应的时间
        System.out.println("延迟了" + (System.currentTimeMillis() - cur) + "ms");
    }

}
